package user.board;

import admin.board.boardModel;

import com.ibatis.sqlmap.client.SqlMapClient;
import comm.IbatisLoader;

public class boardDao {
	
	private IbatisLoader 	iBatis;
	private SqlMapClient 	sqlMapper;
	
	public boardDao(){
		this.sqlMapper = iBatis.setConfig();
	}
	
	
	public boolean getInsert(boardModel boardmodel){
		boolean returnValue = true;
		try{
			sqlMapper.update("board.BOARDCONTACT", boardmodel);
		}catch (Exception e) {
			// TODO: handle exception
			returnValue = false;
		}
		return returnValue;
	}
	
	public boolean getUpdate(boardModel boardmodel){
		boolean returnValue = false;
		try{
			if(sqlMapper.update("board.BOARDUPDATE", boardmodel) > 0){
				returnValue = true;
			}else{
				returnValue = false;
			}
		}catch (Exception e) {
			// TODO: handle exception
		}
		return returnValue;
	}
	

}
